﻿<%@ Page Title="Yeni Yetki Tanımla" Language="C#" MasterPageFile="~/TapuKadastro.master"
    AutoEventWireup="True" Inherits="IKYSWeb.Yetki.Yetki_Yetki" CodeBehind="Yetki.aspx.cs" %>

<%@ Register Src="../UserControls/MenuSec.ascx" TagName="Menu" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CPH" runat="Server">
    <h3 class="title">
        Yetki İşlemleri &#8594; Yeni Yetki Tanımla</h3>
    <asp:MultiView runat="server" ID="mv" ActiveViewIndex="0">
        <asp:View runat="server" ID="vListe">
            <table class="form">
                <tr>
                    <td class="label">
                        Yetki Adı
                    </td>
                    <td>
                        <asp:TextBox ID="txtYetkiAdiAra" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="btnListele" runat="server" Text="Listele" 
                            CausesValidation="false" onclick="btnListele_Click" />
                    </td>
                    <td>
                        <asp:Button ID="btnYeniKayit" runat="server" Text="Yeni Kayıt" CausesValidation="False"
                            OnClick="btnYeniKayit_Click" />
                    </td>
                </tr>
            </table>
            <asp:GridView ID="grdListe" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                CssClass="grid" EmptyDataText="Tanımlı Yetki bulunamadı." DataKeyNames="YetkiID"
                PageSize="20" OnRowDataBound="grdListe_RowDataBound" OnRowCommand="grdListe_RowCommand"
                OnPageIndexChanging="grdListe_PageIndexChanging">
                <Columns>
                    <asp:BoundField DataField="YetkiID" HeaderText="ID" />
                    <asp:BoundField DataField="YetkiADI" HeaderText="ADI" />
                    <asp:BoundField HeaderText="MENÜ" />
                    <asp:BoundField DataField="Silindi" HeaderText="Silindi" />
                    <asp:ButtonField ControlStyle-CssClass="grd_Guncelle" CommandName="Guncelle" Text="Güncelle" />
                    <asp:ButtonField ControlStyle-CssClass="grd_Sil onay" CommandName="Sil" Text="Sil" />
                </Columns>
                <RowStyle CssClass="even" />
                <AlternatingRowStyle CssClass="odd" />
                <EditRowStyle CssClass="odd" />
                <EmptyDataRowStyle CssClass="empty" />
            </asp:GridView>
        </asp:View>
        <asp:View runat="server" ID="vKayit">
            <table class="form">
                <tr>
                    <td class="label">
                        Yetki Adı
                    </td>
                    <td>
                        <asp:TextBox ID="txtYetkiAdi" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvYetkiAdi" runat="server" ControlToValidate="txtYetkiAdi"
                            ErrorMessage="Yetki adı giriniz!"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        Menü
                    </td>
                    <td>
                        <uc1:Menu ID="txtMenu" runat="server" AutoCompleteFunction="MenuGetir" AllowEmpty="false" />
                    </td>
                </tr>
                <tr>
                    <td class="buton" colspan="2">
                        <asp:Button ID="btnGeri" runat="server" CssClass="btn_back" Text="Geri" CausesValidation="False"
                            OnClick="btnGeri_Click" />
                        <asp:Button ID="btnKaydet" runat="server" Text="Kaydet" OnClick="btnKaydet_Click" />
                    </td>
                </tr>
            </table>
        </asp:View>
    </asp:MultiView>
</asp:Content>
